/**
 * video模块接口列表
 */
import store from '../../store/index';
import base from './base'; // 导入接口域名列表
import axios from '../axios'; // 导入http中创建的axios实例
import qs from 'qs'
const video = {    
    // 发送切片
    sendslice(params){
        return axios.post(`${base.admin}/video/`, params, {
            'Content-Type': 'multipart/form-data',
            onUploadProgress: progressEvent => {                
                if (progressEvent.loaded === progressEvent.total) {
                    store.commit('addTotal')
                }
            }
        });    
    },
    // 通知合并
    merge(params){
        return axios.post(`${base.admin}/video/merge/?${qs.stringify(params)}`);    
    },
    // 验证切片
    verify(params){
        return axios.get(`${base.admin}/video/?${qs.stringify(params)}`)
    }
}

export default video;